/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import com.opensymphony.xwork2.ActionSupport;
import thesis.haipv.qa.persistence.FeedbackDAO;

/**
 *
 * @author PHANHAI
 */
public class DoTrust extends ActionSupport {
    private String uid;
    private String asker;
    private String aid;
    private String qid;
    private String t;
            
     @Override
    public String execute() throws Exception {  
       long createtime = System.currentTimeMillis();
       // Map session = ActionContext.getContext().getSession();
        //UserProfile user = (UserProfile) session.get("user");
        FeedbackDAO dao = new FeedbackDAO();
        dao.createFeedback(asker, uid, aid, Float.parseFloat(t), createtime);
        return SUCCESS;
    }

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public String getAsker() {
        return asker;
    }

    public void setAsker(String asker) {
        this.asker = asker;
    }

    public String getT() {
        return t;
    }

    public void setT(String t) {
        this.t = t;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getQid() {
        return qid;
    }

    public void setQid(String qid) {
        this.qid = qid;
    }
     
}
